<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#box {
				width: 50px;
				height: 50px;
				margin: auto;
				background: red;
			}
		</style>
	</head>

	<body>
		<div id="box"></div>
		<script>
			var box = document.getElementById('box');
			var a = 0;

			box.onclick = function() {
				a++;
				if(a%2==0) {
					box.innerHTML = "小";
					box.style.width = '50px';
					box.style.height = '50px';
				} else {
					box.innerHTML = "大";
					box.style.width = '100px';
					box.style.height = '100px';
				}
			}
		</script>
	</body>

</html>